import request from '@/utils/request'

export function addArea(data) {
  return request({
    url: '/area/create',
    method: 'post',
    data
  })
}

export function updateArea(data) {
  return request({
    url: '/area/update',
    method: 'post',
    data
  })
}

export function getAreaTree(data) {
  return request({
    url: '/area/tree',
    method: 'post',
    data
  })
}

export function getAreaList(data) {
  return request({
    url: '/area/list',
    method: 'post',
    data
  })
}

export function fetchCommunityList(data) {
  return request({
    url: '/area/tree',
    method: 'post',
    data
  })
}

export function deleteArea(data) {
  return request({
    url: '/area/delete',
    method: 'post',
    data
  })
}
